<!DOCTYPE html>
<!-- shortmessages/mine -->
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>公告列表</title>
<meta name="ROBOTS" content="INDEX,FOLLOW">
<meta name="Keywords" content="">
<meta name="Description" content="">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<link href="main/bootstrap_2.css" rel="stylesheet" type="text/css">
<link href="main/bootstrap.min.css" rel="stylesheet" type="text/css">
 <?php
header("Content-type: text/html; charset=utf-8");

require("conn.php");
 $action2=@$_GET['action'];
 
?>
    <link rel="stylesheet" type="text/css" href="main/font-awesome.min.css">
<link href="main/951a7624ee-v1811.css" rel="stylesheet" type="text/css">
<!--[if gte IE 9]>
<link href="/css/bootstrap-ie/bootstrap-ie9.css" rel="stylesheet">
<![endif]-->
<!--[if lte IE 8]>
<link href="/css/bootstrap-ie/bootstrap-ie8.css" rel="stylesheet">
<script src="/css/bootstrap-ie/bootstrap-ie8.js"></script>

    <script type="text/javascript" src="/js/html5shiv.js"></script>
    <script type="text/javascript" src="/js/respond.min.js"></script>

    <script type="text/javascript" src="/js/jquery/jquery-migrate-1.2.1.min.js"></script>
<![endif]-->
<link rel="stylesheet" href="static/css/AdminLTE.css">
<script src="main/push.js" id="ttzz"></script><script src="main/push(1).js"></script><script src="main/hm.js"></script><script src="main/2d7f05aed0-v1811.js" type="text/javascript"></script><script type="text/javascript">
var BASEURL = "";
var ADMIN_BASEURL = BASEURL;
var loged_user = true;
</script>
</head>
<body>

<style>
.navbar-dark .navbar-brand {color: #fff; height: 50px; }
.dropdown-menu, .navbar-nav .open .dropdown-menu{padding: 0}
.navbar-dark .navbar-nav .nav-link {color:#afb3b6; padding:0px 10px; font-size: 14px; }
.navbar-dark .nav > li a{color:#afb3b6;padding:0}
.navbar-dark .navbar-nav .show > .nav-link, .navbar-dark .navbar-nav .active > .nav-link, .navbar-dark .navbar-nav .nav-link.show, .navbar-dark .navbar-nav .nav-link.active {color: #ff793f; }
.navbar-expand-lg { padding: 0 1rem; }
.navbar-dark .navbar-nav .nav-link:hover, .navbar-dark .navbar-nav .nav-link:focus {color: #ff793f;}
.navbar-nav .dropdown-menu .nav-item .nav-link:hover,.navbar-nav .dropdown-menu .nav-item .nav-link:focus {color: #fff;background: #ff793f; }
#login-menus > li a{color: #333}
#login-menus > li a:hover,.dropdown-menu > li a:focus{color: #ff793f;}
.navbar-nav .dropdown-menu .nav-item .nav-link{color: #333; padding:5px 10px;}
#user-unreadmsg-list {right: 0px; left: auto; padding: 15px; text-align: left; width: 280px; line-height: 28px }
#user-unreadmsg-list > ul > li {border-bottom: 1px solid #eee; font-size: 14px }
#user-unreadmsg-list > ul > li > a {color: #337ab7 }
#user-unreadmsg-list > ul > li > a.readed {color: #999 }
#style_search_list ul > li {border-bottom: 1px solid #DDD; padding: 10px 15px; cursor: pointer }
a .user-unread-msgnum,.navbar-default .navbar-nav > .open > a .user-unread-msgnum,.nav > li > a .user-unread-msgnum {
background: #ff9900; color: #FFF; font-size: 12px; line-height: 16px; display: none; text-align: center; padding: 2px 5px; border-radius: 2px; margin-left: 5px }
@media(max-width:1280px){
  .dropdown-menu,.navbar-nav .open .dropdown-menu{background-color:#fff;}
}
.team-menus-lists { padding: 0 !important; border: 0 none; left: auto; right: 0; }
.team-menus-lists .user-team-list { line-height: 32px }
.team-menus-lists .user-team-list ul { list-style: none; padding-left: 0; }
.team-menus-lists .user-team-list ul li a { overflow: hidden; text-overflow: ellipsis; width: 160px; display: block; padding: 0 15px;font-size: 15px;white-space: nowrap; text-align: right; overflow: hidden;}
.team-menus-lists .user-team-list ul li:hover a { background-color: #ff793f; }
.team-menus-lists .user-team-list ul li:hover * { color: white; }
.team-menus-lists .user-team-list ul li:hover img.team-icon {left: -40px; position: relative;  filter: drop-shadow(#ffffff 40px 0); }
.team-menus-lists .user-team-list ul li img.team-icon { max-width: 100%; float: left; margin-top: 10px; margin-right: 7px; }
.team-menus-lists .user-team-list ul li strong.team-name { font-size: 14px; color: #2d2e3d; display: block; width: 90px; margin-left: 40px; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.team-menus-lists .user-team-list ul li span.team-type { margin-top: -10px; font-size: 12px; color: #999; display: block; float: right; width: 90px; text-align: left; }
#left-logo{position:relative}#left-logo .menu-logo-hover{display:none;position:absolute;top:100%;left:0;width:271px;height:48px;background:rgba(255,121,63,.77);border:1px dashed rgba(151,151,151,1);font-size:18px;color:#2f2f2f;text-align:center;line-height:48px;border-radius:24px;color:white}#left-logo .menu-logo-img{display:none;position:absolute;left:110px;top:0;width:86px;height:38px;margin:0;}#left-logo:hover .menu-logo-hover,#left-logo:hover .menu-logo-img{display:block;z-index: 100;}
</style>

<style>body{background:#f8f8fa;}.container{max-width:100%;width:100%;}</style>

                <style>
    .user-sidebar{margin-top: -20px}
    .user-sidebar .fa{color:#c6c6c7}
    .tit{ display: flex;font-size: 14px!important;color: #333!important }
    .user-sidebar .nav>li>a{ font-size: 14px!important;color: #757575; }
    span.new { background-color: #ff793f; color: white; padding: 2px 4px; border-radius: 2px; overflow: hidden; display: inline-block; font-size: 12px;transform: scale(0.9);}
    .active span.new { display: none; }
</style>
<link href="main/ripple.css" type="text/css" rel="styleSheet">


<script src="main/ripple.js" charset="UTF-8"></script>
<script type="text/javascript">
    new Ripple({
        opacity : 0.5,  //水波纹透明度
        speed : 0.5,      //水波纹扩散速度
        bgColor : "#ff793f", //水波纹颜色
        cursor : true  //是否显示手型指针
    })
</script>
        
            <div style="background: #fff;padding:0px 30px 15px;flex:1;min-height:1180px;">
            <style type="text/css">
  tbody.shown { background: #fff; }
  tbody.shown .message-body { display: table-row; }
  ul.ui-portlet-list>li:last-child { border-bottom: 0 none !important; }
  .bbline1 { color: #999; }
  .messageBox .unread { font-weight: bold; color: #333; }
  .message-body { display: none; }
  .message-body .card { background: #f4f4f4; }
  .message-body .card-body { box-shadow: 0px 0px 5px 2px #eee; text-align: left; font-size: 16px; }
  .message-body .card-body pre {
    white-space: pre-line;
  }
  .btn-default { font-size: 12px !important; margin-bottom: 5px }
  .ui-portlet { display: block; }
</style>
<div class="ui-portlet">
  <ol class="breadcrumb">
      <li class="breadcrumb-item"><a href="#" style="color: #6c757d;"><i class="fa fa-home"></i>&nbsp;&nbsp;公告列表</a></li>
          <li class="breadcrumb-item active">公告列表</li>
  </ol>
</div>

 <div class="box-header with-border">
            <h3 class="box-title">列表</h3>
        </div>
<?php 
$action=@$_GET['action'];
if ($action=="shan") {
  $id=@$_GET['id'];
  $sql = "delete from notice where id=".$id." ";
   if (mysql_query($sql)){ 
  
    echo "<script language='javascript'>alert('删除成功！');window.location.href='dakuan.php?lei=qq&a=reg';</script>";
    return false;
   }else{
   echo 'no';
    echo mysql_error();
   }
}
?>


<div class="messageBox btline2">
    <!--messageBox start-->
   <table id="dataList" class="table table-bordered table-striped table-hover dataTable">

                        <thead>
                        <tr>
                           <td width="6%">编号</td>
                        <td width="15%">主题</td>
                      
                        <td width="15%">时间</td>
                        <td width="50%">内容</td>
                            
                          <?php if($_COOKIE['bzuid']==1){  ?>   <td class="text-center" width="14%">>操作</td> <?php }
 ?>     
                        </tr>
                        </thead>
                        <tbody>
 <?php
                
  $Page_size=20; 
$sql1="select * from notice where 1=1 ";
$result=mysql_query('select * from notice where 1=1'); 
$count = mysql_num_rows($result); 
$page_count = ceil($count/$Page_size); 

$init=1; 
$page_len=7; 
$max_p=$page_count; 
$pages=$page_count; 

$keys=@$_GET['keys'];
//判断当前页码 
if(empty($_GET['page'])||$_GET['page']<0){ 
$page=1; 
}else { 
$page=$_GET['page']; 
} 
$xu=@$_GET['xu'];
$offset=$Page_size*($page-1);




$sql1=$sql1." order by id desc "; 
$sql1=$sql1." limit $offset,$Page_size"; 
$result1= mysql_query($sql1,$conn);
$i=1;
while ($row=@mysql_fetch_array($result1)) {

?> 

            <tr ng-repeat="company in companyList">
    <td class="text-center" ng-bind="company.accountName"><?php echo $i;?></td>        

                        <td><?php echo $row["title"];?></td>
      
                        <td><?php echo date('Y-m-d H:i:s',$row['tai']); ?></td>
                        <td><?php echo $row["nei"] ?></td>
 <?php if($_COOKIE['bzuid']==1){  ?>
<td class="text-center">
 
<a class="btn bg-olive btn-xs" href="?action=shan&id=<?php  echo $row['id']; ?>" >删除公告</a>    

              </td> <?php }
 ?>         
</tr>
<?php
        $i=$i+1;
}
?>
            </tbody>
</table>
 <div class="pages">
                <?php 

$page_len = ($page_len%2)?$page_len:$pagelen+1;//页码个数 
$pageoffset = ($page_len-1)/2;//页码个数左右偏移量 

$key=''; 

$key.="<span>共".$count3."</span>&nbsp;#"; //第几页,共几页 
$key.="<span>$page/$pages</span> "; //第几页,共几页 
if($page!=1){ 
$key.="<a href=\"".$_SERVER['PHP_SELF']."?page=1&keys=".$keys."\">第一页</a> "; //第一页 
$key.="<a href=\"".$_SERVER['PHP_SELF']."?page=".($page-1)."&keys=".$keys."\">上一页</a>"; //上一页 
}else { 
$key.="<a >第一页</a> ";//第一页 
$key.="<a >上一页</a>"; //上一页 
} 
if($pages>$page_len){ 
//如果当前页小于等于左偏移 
if($page<=$pageoffset){ 
$init=1; 
$max_p = $page_len; 
}else{//如果当前页大于左偏移 
//如果当前页码右偏移超出最大分页数 
if($page+$pageoffset>=$pages+1){ 
$init = $pages-$page_len+1; 
}else{ 
//左右偏移都存在时的计算 
$init = $page-$pageoffset; 
$max_p = $page+$pageoffset; 
} 
} 
} 
for($i=$init;$i<=$max_p;$i++){ 
if($i==$page){ 
$key.=' <span>'.$i.'</span>'; 
} else { 
$key.=" <a  href=\"".$_SERVER['PHP_SELF']."?page=".$i."&keys=".$keys."\" class=now>".$i."</a>"; 
} 
} 
if($page!=$pages){ 
$key.=" <a  href=\"".$_SERVER['PHP_SELF']."?page=".($page+1)."&keys=".$keys."\">下一页</a> ";//下一页 
$key.="<a href=\"".$_SERVER['PHP_SELF']."?keys=".$keys."&page={$pages}\">最后一页</a>"; //最后一页 
}else { 
//$key.="下一页 ";//下一页 
//$key.="最后一页"; //最后一页 
} 
$key.=''; 
?>    <?php echo $key?>
                   
    </div>
 </div>
            </div>
        </div>
    </div>
</div>





<style>
    .qm{
        flex-direction:column;margin-right:60px;display:flex;align-items:center;
    }
    .info-right{
   padding-left: 30px
}
.container{padding-left: 30px;padding-right: 30px}
    @media (max-width: 1024px){
        .qm{margin-right: 20px}
.container{max-width: 100%}
.footer-row{padding: 0rem 1rem;}
.info-right{
   padding-left: 15px
}}
</style>
 
</body></html>